Release 10.1A: OpenEdge Data Management:
DataServer for ODBC
Zero-length character strings
When you use the unknown value in a
WHEREclause with the DataServer, the unknown value satisfies only the equals (=) operator. You can also use a zero-length character string in aWHEREclause. The unknown value and zero-length character string are not the same. The unknown value translates to aNULL, which is a special marker in a data source that supportsNULLs used to represent missing information. On the other hand, zero-length strings and blank columnscontain actual values. Both of the following statements find the first
customerrecord with a zero-length string in theaddress2field. Notice the space between the quotation marks in the first statement:
Although “” and “ ” evaluate the same way in a
WHEREclause, they have different results when you use them with theBEGINSfunction. For example, the following statement retrieves all customer names except those that have the unknown value:
The following statement uses “ ” to retrieve only those names that begin with a space:
The following statement is not meaningful to an ODBC data source. It generates the error message “Illegal operator for unknown value or zero length character string:”
This restriction has been relaxed for columns of the
DATEdata type. For example, the following statement is valid:
DB2 considers all zero-length character strings as equal to a single space. Therefore, DB2 considers “” and a string of blank spaces to be effectively the same thing.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |